package 循环;

import java.util.Scanner;

public class demo06 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int i=1;
        boolean a=true;
        while(a){
            System.out.println("请输入第"+i+"学生成绩");
            int b =sc.nextInt();
            i++;
            System.out.println("是否继续（Y/N）");
            String c =sc.next();
            if(!c.equals("Y")){
                break;
            }
            if(i==5){
                break;
            }
        }
    }
}
